From: Jasper St. Pierre Date: Wed, 12 Jun 2013 03:33:54 +0000 (-0400) Subject: slider: Extend the trough to the allocation extents X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4019 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a01469fb086b57319b3bfa9fc807493171c0106f;p=gnome-shell.git slider: Extend the trough to the allocation extents This aligns the edge of the slider with the allocation of items under it, which is what we want to happen in the new aggregate menu. https://bugzilla.gnome.org/show_bug.cgi?id=702825 --- diff --git a/js/ui/slider.js b/js/ui/slider.js index ba8b9f663..534b3748b 100644 --- a/js/ui/slider.js +++ b/js/ui/slider.js @@ -48,7 +48,6 @@ const Slider = new Lang.Class({ let [hasHandleColor, handleBorderColor] = themeNode.lookup_color('-slider-handle-border-color', false); - let sliderWidth = width - 2 * handleRadius; let sliderHeight = themeNode.get_length('-slider-height'); let sliderBorderWidth = themeNode.get_length('-slider-border-width'); @@ -64,7 +63,7 @@ const Slider = new Lang.Class({ sliderActiveColor.green / 255, sliderActiveColor.blue / 255, sliderActiveColor.alpha / 255); - cr.rectangle(handleRadius, (height - sliderHeight) / 2, sliderWidth * this._value, sliderHeight); + cr.rectangle(0, (height - sliderHeight) / 2, width * this._value, sliderHeight); cr.fillPreserve(); cr.setSourceRGBA ( sliderActiveBorderColor.red / 255, @@ -79,7 +78,7 @@ const Slider = new Lang.Class({ sliderColor.green / 255, sliderColor.blue / 255, sliderColor.alpha / 255); - cr.rectangle(handleRadius + sliderWidth * this._value, (height - sliderHeight) / 2, sliderWidth * (1 - this._value), sliderHeight); + cr.rectangle(width * this._value, (height - sliderHeight) / 2, width * (1 - this._value), sliderHeight); cr.fillPreserve(); cr.setSourceRGBA ( sliderBorderColor.red / 255,